{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "11027cfe",
   "metadata": {},
   "source": [
    "<table align=\"left\">\n",
    "  <td>\n",
    "    <a href=\"https://colab.research.google.com/github/nyandwi/machine_learning_complete/blob/main/4_real_world_data_analysis_and_preparation/2_intro_to_data_preparation.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
    "  </td>\n",
    "  <td>\n",
    "</table>"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "74a6ad68",
   "metadata": {},
   "source": [
    "*This notebook was created by [Jean de Dieu Nyandwi](https://twitter.com/jeande_d) for the love of machine learning community. For any feedback, errors or suggestion, he can be reached on email (johnjw7084 at gmail dot com), [Twitter](https://twitter.com/jeande_d), or [LinkedIn](https://linkedin.com/in/nyandwi).*"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7c82c64e",
   "metadata": {},
   "source": [
    "# A Recipe: Intro to Data Preparation"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "989772bd",
   "metadata": {},
   "source": [
    "You have probably heard the notion that Machine Learning Engineers and Data Scientists spend more than 80% cleaning the data. That is not to exagerate, it is true and there is a reason. \"Good model comes from good data\". In the real world, many datasets are messy. and it takes enormous amount of time to get the data in good shape. \n",
    "\n",
    "Preparing data is a process. You can manipulate, remove, or create new features. To elaborate it, here are more things that you are most likely to do: \n",
    "\n",
    "* To check and remove duplicate values.\n",
    "* To decide if you will remove or if you can keep missing values. Missing values can either be removed, filled, or left as they are. This depend on the size of dataset, and the goal. \n",
    "* To remove noise from the data such as features which doesn't have good predictive power. \n",
    "* To convert the values/features into their proper format. A quick example, if you have a numeric feature, you should never have some text values in it. Or if you are working in image related problems, you should never have images which have extensions of `(image_name.bmp)` for example. Images are usually in `jpg` or `.png` formats.\n",
    "* To encode categorical features. \n",
    "* To create additional features. This is a creative process, but when done well, you can boost your machine learning model performance with those features especially if they have high predictive power.\n",
    "* To Standardize/normalize numeric features: This is to scale the numeric features down to small values. Normalizing is scaling the numeric features to the values between 0 and 1 whereas Standardizing is scaling the numeric features to have zero mean and unit standard deviation. Feeding the scaled features makes the machine learning model training fast. \n",
    "\n",
    "The above points are a shallow list, not a step after a step. There are also other things involved as well, such as shuffling or randomizing the dataset, splitting the data into training, validation and test sets. \n",
    "\n",
    "As this was a recipe, we will see a proper work flow of data preparation in the next chapters when doing end to end machine learning projects. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d4cfd346",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3.7.10 64-bit ('tensor': conda)",
   "language": "python",
   "name": "python3710jvsc74a57bd034ac5db714c5906ee087fcf6e2d00ee4febf096586592b6ba3662ed3b7e7a5f6"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
